﻿using FoundationLib.Ifc.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FoundationLib.Data.NHibernate
{
	/// <summary>
	/// Provides universal access to the NHibernate session manager.
	/// </summary>
	public static class NHibernateManager
	{
		/// <summary>
		/// The session manager instance.
		/// </summary>
		private static ISessionManager sessionManager;

		/// <summary>
		/// Gets the NHibernate session manager.
		/// </summary>
		public static ISessionManager SessionManager
		{
			get
			{
				if (sessionManager == null)
					sessionManager = new NHibernateSessionManager();
				return sessionManager;
			}
		}
	}
}
